<script lang="ts" setup>
	import { computed, onMounted } from 'vue';

	const props = withDefaults(defineProps<{
		customStyle ?: any,
		bottomSafeArea ?: string
	}>(), {
		customStyle: {}
	})

	const styles = computed(() => {
		const titleBarHeight = uni.getSystemInfoSync().windowTop
		return {
			minHeight: `calc(100vh - ${titleBarHeight}px)`,
			backgroundColor: '#f5f5f5',
			...props.customStyle
		}
	})
</script>

<template>
	<view class="um-page" :style="styles">
		<slot></slot>
	</view>
</template>

<style lang="scss" scoped>
	.um-page {
		box-sizing: border-box;
		padding-bottom: env(safe-area-inset-bottom);
	}
</style>